package com.yuan.model_convenient.service;

import com.yuan.model_convenient.domain.ConvenientRepair;
import com.yuan.model_convenient.service.dto.ConvenientRepairDto;
import com.yuan.model_convenient.service.dto.ConvenientRepairQueryCriteria;
import me.zhengjie.utils.PageResult;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface ConvenientRepairService {

    PageResult<ConvenientRepairDto> queryAll(Pageable pageable);

    void download(List<ConvenientRepairDto> queryAll, HttpServletResponse response) throws IOException;

    PageResult<ConvenientRepairDto> queryAllByType(ConvenientRepairQueryCriteria criteria, Pageable pageable);

    @Transactional(rollbackFor = Exception.class)
    void create(ConvenientRepair resources);

    @Transactional(rollbackFor = Exception.class)
    void update(ConvenientRepair resources) throws Exception;

    @Transactional(rollbackFor = Exception.class)
    void delete(Integer ids);
}
